package tijava.container.type;

/**
 * 重写了hashCode方法，因此不同对象，只有字段值相等，则hashCode值相等<br>
 * 未重写equals方法，使用默认equals方法，只有引用同一对象时，两者才相等
 * 
 * @author nathan
 * 
 */
public class HashCodeType extends BasicType {
	public HashCodeType() {
	}

	public HashCodeType(char primary, int secondary, String item) {
		super(primary, secondary, item);
	}

	public int hashCode() {
		int result = 17;
		result = 37 * result + this.primary;
		result = 37 * result + this.secondary;
		result = 37 * result + (this.item == null ? 0 : this.item.hashCode());
		return result;
	}
}
